home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / utilities / safemem2.lha / test.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-05  |  342 b   |  25 lines

  1. #define SAFEMEM
  2.  
  3. #include <exec/types.h>
  4. #include <exec/memory.h>
  5. #include <proto/exec.h>
  6. #include "lb:safemem/safemem.h"
  7.  
  8. main()
  9. {
  10.   char *foo;
  11.  
  12.   foo = malloc(1024);
  13.   free(foo+23);
  14.  
  15.   foo = AllocMem(1024, MEMF_PUBLIC);
  16.   FreeMem(foo, 2048);
  17.  
  18.   AllocMem(123, MEMF_PUBLIC);
  19.  
  20.   FreeMem((void *)123, 456);
  21.  
  22.   ShowMemList();
  23.   FreeMemList();
  24. }
  25.